<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div></div>
    <script>
        var div = document.querySelector('div');
        var params = decodeURI(location.search.substr(1), "utf-8");
        console.log(params);
        var arr = params.split('=');
        //获取时间
        var date = new Date()
        var hour = date.getHours();
        if (hour <= 12) {
            hour = '    早上好!';
        } else if (hour <= 18) {
            hour = ' 下午好!';
        } else {
            hour = ' 晚上好!';
        }
        alert('登录成功!')
        div.innerHTML = arr[1] + hour;
    </script>
</body>

</html>